//
//  NetworkTools.m
//  OC-LBWeibo
//
//  Created by 李博 on 15/6/29.
//  Copyright © 2015年 libo. All rights reserved.
//

#import "NetworkTools.h"

@implementation NetworkTools

+ (instancetype)sharedNetworkTools
{
    static NetworkTools *instace;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instace = [[self alloc]initWithBaseURL:[NSURL URLWithString:@"https://api.weibo.com/"]];
        //设置响应的默认反序列化格式
        NSSet *strSet = [[NSSet alloc]initWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/plain", nil];
        instace.responseSerializer.acceptableContentTypes = strSet;
    });
    return instace;
}

@end
